NetEvents is a scriptable TCP/IP application that allows script authors to use Frontier or AppleScript to create TCP/IP connections to other server, accept TCP/IP connections, read and write data, and perform domain name operations.
NetEvents is "self-documenting" in that the AppleScript Dictionary documents the calls supported by NetEvents and the sample scripts show detailed examples of how to use NetEvents. Userland Frontier has fantastic support for NetEvents. Check out the specifics at
NetEvents "BG" is a background only version of the NetEvents application. Just stick it in your start-up items folder if you want to use NetEvents but don't want the user interface cluttering up your desktop.
Support
You get what you pay for. :) Slightly more detailed information on NetEvents can be found on-line at:
http://www.biap.com/downloads/netevents.html
You can find NetEvents discussed in comp.sys.mac.com, various scripting mailing lists, etc. Please send any bug reports to info@biap.com. Unfortunately, we can't provide support for script debugging or help getting the pig to work, so please don't send private mail. Hey, it's free, so don't complain.
Legal Stuff
NetEvents is being distributed at no cost to the Macintosh scripting community. Yep, it's free. It's still copyrighted by the author and you need the author's permission if you want to redistribute NetEvents on any medium. Otherwise, have fun.
NetEvents Release Notes
NetEvents 1.0.1, 8/6/97
One bug fix.
• Corrected a problem with the AbortStream event not terminating connections.
NetEvents 1.0, 8/4/97
Minor changes, better error reporting.
• Connection count no longer goes negative, resulting in huge numbers in the display.
• The "Read" event was changed so that it returns immediately if no unread data is pending on the connection.
• Improved AppleEvent error reporting. The 'errs' and 'errn' parameters in the reply event are now always filled in with appropriate info if an error happens.
NetEvents 1.0b7, 4/15/97
Two new features.
• Added Frontier menu sharing to NetEvents.
• Created a background-only version of NetEvents. Toss the "BG" version in your start-up items folder and you'll have unobtrusive TCP/IP scripting commands available system-wide.
NetEvents 1.0b6, 2/28/97
Corrected a few bugs. Beefed up error detection.
• Listens that complete successfully now properly send the LISC event. This was broken under b5 and only worked for connections that were opened with no pending data.
• Quitting NetEvents while TCP/IP operations are in progress doesn't crash now. NetEvents waits until the operations terminate. Pending AppleEvents will fail and callers will be notified accordingly.
• Requesting the status of stream that no longer exists (or never existed) returns INACTIVE instead of CLOSED as with previous versions. This is a more appropriate response since the connection is invalid and not just closed.
• Added a key to the connection status colors in the About Box. About Box now doesn't block TCP/IP operations.
NetEvents 1.0b5, 2/16/97
One new event, spiffy new interface, minor bug fixes.
• corrected a problem where Listens that were aborted still resulted in a Listen Complete event being sent by NetEvents. Aborting a listen now results in an "event not handled" error being returned to the caller and the stream being discarded.
• added a new event, MyIPAddress, that looks like: return (appleEvent (netEvents.id, 'WAPI', 'MYIP')) and returns a long. This event returns the TCP/IP address of the local host.
• reduced the amount of debugging output and cleaned up the status window. Added indicator lights for each connection that has been created. Colors are as follows:
gray - inactive or new
red - closed
orange - closing
yellow - open
blue - data pending
green - listening
NetEvents 1.0b4, 2/15/97
New events, better closing behavior (I think).
• Added AbortStream event. In UserTalk: return (appleEvent (netEvents.id, 'WAPI', 'ABOR', '----', long (stream)))
Kills any stream, regardless of the state it's in.
• Added AddrToName event. In UserTalk: dns = appleEvent (netEvents.id, 'WAPI', 'AD2N', '----', long (adr))
Takes a 4 byte integer address as returned from ListenComplete or NameToAddr and converts it into a domain name.
• Changed CloseStream code to consume any pending data on the connection before trying to close it. This keeps OT much happier and should eliminate the early connection termination problems with Netscape, etc.
NetEvents 1.0b3, 2/13/97
Listens are now implemented correctly! I've corrected the event definitions below in the 1.0b2 notes. Notice that the ListenComplete event now has two parameters that can indicate failure. In general, the stream parameter will be the same value as was returned from ListenStream. Usually, a failure will appear as a client address of zero.
• corrected the AETE for ListenStream.
NetEvents 1.0b2, 2/12/97
Listens are now implemented. I think. This needs serious testing as I cannot seem to get the response to be received and it has to do with the limits of my testing environment. Frontier will provide a better framework for figuring out what's wrong (or right.)
The listen works, the incoming connection is connected, but I can't tell if the LISC event is being addressed and sent properly. If someone can add the appropriate code to the NetEvents suite and send it to me, it would help immensely.
NetEvents 1.0b1, 2/2/97
This release is quite a bit beefier than the previous, limited version. Here's what has changed:
• Added threading for individual IP commands, reduced default thread stack size to 8k. This should allow up to about 16 simultaneous connections before the memory partition (384k) needs to be increased. Each connection takes the 8k for the thread plus another 12k or so for TCP/IP buffers and data structures.
• Added a minimal connection status display, updated every 5 seconds with the current connection load and the total connections processed (opened).
• Added clean-up code to close connections that are idle for longer than 60 seconds. To keep a connection active, make StreamStatus calls occasionally.
• Added code to close all active connections if the application is quit.